package com.xiaoma.chat.resource;

public enum Role {

    ADMIN(1),TEACHER(2),STUDENT(3);
    
    private Integer code;
    
    private Role (Integer code) {
        this.code = code;
    }
    
    public Integer code() {
        return this.code;
    }
    
    public static boolean isExist(int code) {
        return ADMIN.code == code || TEACHER.code == code || STUDENT.code == code;
    }
}
